home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
winlib3.zip
/
WSTRUCT.H
< prev
next >
Wrap
Text File
|
1991-01-14
|
5KB
|
126 lines
/* Note: scroll bars on viewports will be supported in a future version */
#ifndef _WINSTRUCT_DEF
#define _WINSTRUCT_DEF
#define MAXVBUFSIZE 0xFFFFUL
#if defined (LPOWERC)
typedef char far * WBUFPTR;
#else
typedef char * WBUFPTR;
#endif
#ifndef NUMBOXCHARS
#define NUMBOXCHARS 8
#endif
#ifndef MAXSCROLLSTRING
#define MAXSCROLLSTRING 6
#endif
typedef struct v_win_status
{
unsigned viewport_flag:1; /* tells if virtual window has a viewport */
unsigned vwtype:1; /* tells what type of virtual window */
unsigned wrap_flag:1;
unsigned big_vw:1;
} V_WIN_STAT;
typedef struct virtual_window
{
unsigned nbufs; /* number of 64K buffers required */
unsigned char far * far *text; /* pointer to huge text */
unsigned char far * far *attr; /* pointer to attributes */
unsigned nrows; /* number of rows in window */
unsigned ncols; /* number of columns in window */
unsigned row; /* row of logical cursor */
unsigned col; /* col of logical cursor */
int wnum; /* virtual window number */
int num_windows; /* pointer to list of windows */
V_WIN_STAT stat_info;
} VWINDOW, *VWPOINTER;
/****************************
* Define window status bits *
****************************/
typedef struct win_status
{
unsigned border_flag:1; /* Window border flag */
unsigned wrap_flag:1; /* Window wrap flag */
unsigned open_flag:1; /* window open flag */
unsigned init_flag:1; /* window initialized flag */
unsigned visible_flag:1; /* window visible flag */
unsigned v_window_flag:1; /* window is a viewport flag */
unsigned bufptr_flag:1; /* tells if memory allocated for window buffer
* pointer */
unsigned sync_curs:1; /* tells if cursor is to be moved */
unsigned frozen_flag:1; /* tells if virtual window is frozen */
unsigned seethru_flag:1; /* tells if window is a see thru window */
unsigned move_flag:1; /* used internally for window update routines */
/*unsigned scroll_bars_on:1; */ /* tells if scroll bars are on */
} WIN_STAT;
typedef struct
{
unsigned shadow_flag:1; /* tells if there is a shadow */
unsigned shadow_pos:3; /* tells where shadow is */
unsigned shadow_trans:1; /* tells if shadow is transparent */
} SHADOW_STAT;
typedef struct
{
int schar; /* shadow character */
int sattr; /* shadow attribute */
int swidth;
int sheight;
SHADOW_STAT shadow_stat;
} WIN_SHADOW;
typedef struct
{
char scroll_string[MAXSCROLLSTRING];
int hilite_attr;
int norm_attr;
} SCROLL_BAR_INFO;
/**************************
* Define window structure *
**************************/
typedef struct window
{
VWPOINTER vwptr; /* pointer to virtual window */
unsigned int vwrow; /* virtual window row */
unsigned int vwcol; /* virtual window column */
int origx; /* original x-position */
int origy; /* original y-position */
int col; /* window column */
int row; /* window row */
int width; /* window width */
int height; /* window height */
int xpos; /* current window x position */
int ypos; /* current window y position */
int wnum; /* Window number */
int rank; /* Where window is in list of windows */
int pagenum; /* video page where window is opened */
int cursorshape; /* tells the cursor shape */
int battr; /* border attribute */
int wattr; /* window attribute */
char boxchars[NUMBOXCHARS]; /* box characters */
WBUFPTR textbuf; /* points to text plane */
WIN_STAT stat_info; /* window status flags */
WIN_SHADOW shadow_info; /* shadow status */
/* SCROLL_BAR_INFO scroll_bar_info; scroll bar information */
} WINDOW, *WPOINTER;
#include <vidsys.h>
#endif